package day5;

public class Demo7 {

    static class Programmer {

        private String skill;

        private String name;

        public void work(){
            System.out.println("我在写" + this.skill);
        }
    }

    static class Java extends Programmer{

        private String skill;

        private  String name;

        public Java(String name, String skill) {
            this.skill = skill;
            this.name = name;
        }

        public void work(){
            System.out.println("我在写" + this.skill);
        }
    }

    static class Php extends Programmer{
        private String skill;
        private String name;

        public Php(String name, String skill) {
            this.skill = skill;
            this.name = name;
        }

        @Override
        public void work() {
            System.out.println("我在写" + this.skill);
        }
    }

    static class Python extends Programmer{
        private String skill;
        private String name;

        public Python(String name, String skill) {
            this.skill = skill;
            this.name = name;
        }

        @Override
        public void work() {
            System.out.println("我在写" + this.skill);
        }
    }

    public static void main(String[] args) {
        Java j = new Java("张三", "java");
        j.work();

        Php php = new Php("李四", "php");
        php.work();

        Python python = new Python("王五", "Python");
        python.work();

    }
}
